#pragma once

#include <Winsvc.h>
#include <Windows.h>
#pragma comment(lib,"advapi32.lib")

class CDriverLoad
{
public:
	CDriverLoad(void);
	~CDriverLoad(void);
public:
	DWORD m_dwLastError;
	HANDLE m_hDriver;
	SC_HANDLE m_hSCManager;
	SC_HANDLE m_hService;
	BOOL m_IsStarted;
	BOOL m_bOpened;
public:
	BOOL Install(PTCHAR PInfPath, PTCHAR pServiceName);
	BOOL UnInstall(PTCHAR pServiceName);
	BOOL Start();
	BOOL Stop();
	BOOL Remove();
	BOOL IsRemoved();
	BOOL IsInstalled();
	BOOL Open(PTCHAR pLinkName);
	BOOL close();
	BOOL IoControl(DWORD dwIoCode, PVOID InBuff, DWORD InBuffLen, PVOID OutBuff, DWORD OutBuffLen, DWORD *RealRetBytes);
};



